package cn.wubo.vrr.help.service.impl;

import cn.wubo.vrr.help.entity.Gitstat;
import cn.wubo.vrr.help.repository.GitstatRepo;
import cn.wubo.vrr.help.service.GitstatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GitstatServiceImpl implements GitstatService {

    @Autowired
    GitstatRepo gitstatRepo;

    @Override
    public List<Gitstat> findAll() {
        return gitstatRepo.findAll();
    }

    @Override
    public List<Gitstat> findAllByDateOrderByProjectAscAuthorAsc(String date) {
        return gitstatRepo.findAllByDateOrderByProjectAscAuthorAsc(date);
    }

    @Override
    public boolean existsByDate(String date) {
        return gitstatRepo.existsByDate(date);
    }
}
